home *** CD-ROM | disk | FTP | other *** search
/ Utilities Professional 1-1500 / Utilities Professional 1-1500 (1994)(WPD)[!].iso / 12511500 / var1373.dms / var1373.adf / MM Hard Disk Install < prev    next >
Text File  |  1993-11-08  |  5KB  |  229 lines

  1. ; $VER: Money Matters v3.22/10/93
  2. ; Copyright (C) Digita International
  3.  
  4. (complete 0)
  5.  
  6.  
  7. ; The amount of space needed on the hard disk to install
  8. (set HDSizeNeeded 1)
  9.  
  10.  
  11. ; Start string definitions
  12. (set #ProgName
  13. (cat "Money Matters"
  14. ))
  15.  
  16.  
  17. (set #Welcome-Pirate
  18. (cat "\n\n\n\nWelcome to the " #ProgName " Installer\n\n"
  19.     "Copyright (C) 1993 Digita International\n\n\n\n"
  20. ))
  21.  
  22. (set #InsertDiskMsg
  23. (cat "\nPlease insert the disk labelled\n\n"
  24. ))
  25.  
  26. (set #InsertAmigaDiskMsg
  27. (cat "\nPlease insert the Amiga Workbench disk labelled\n\n"
  28. ))
  29.  
  30. (set #diskhelp
  31.     (cat "\n    If you know that the correct disk is in the drive, but you still cannot proceed, "
  32.         "then the name of the disk is incorrect.\n"
  33.         "    Ensure that the disk name is not preceded by 'copy_of_', or blank spaces before or after the disk name.\n\n\n" @askdisk-help
  34.     )
  35. )
  36.  
  37. (set #MMDiskName
  38. (cat "Money Matters"
  39. ))
  40.  
  41.  
  42. (set #BadKick
  43. (cat #LongProgName " requires Workbench 2.04 or above to work correctly."
  44. ))
  45.  
  46.  
  47. (set #HardDiskDefaultDest
  48. (cat "Work:"
  49. ))
  50.  
  51. (set #LibSource
  52. (cat #MMDiskName ":Libs"
  53. ))
  54.  
  55. (set #FontSource
  56. (cat #MMDiskName ":Fonts"
  57. ))
  58.  
  59.  
  60. (set #HardDiskLibDest
  61. (cat "LIBS:"
  62. ))
  63.  
  64. (set #HardDiskFontDest
  65. (cat "FONTS:"
  66. ))
  67.  
  68.  
  69. (set #HardDiskDestChoiceMsg
  70. (cat "Where do you want to install the\n" #ProgName " program drawer?"
  71. ))
  72.  
  73. (set #HardDiskDestChoiceHelp
  74. (cat "    Select the drawer where you want to install " #ProgName ", then click Proceed (a new drawer titled \"" #ProgName "\" will be created and will contain the " #ProgName " program.)"
  75. ))
  76.  
  77. (set #HardDiskDestChoiceConfirmMsg1
  78. (cat "\nAre you sure you want to install " #ProgName " in the destination:\n\n\""
  79. ))
  80.  
  81. (set #HardDiskDestChoiceConfirmMsg2
  82. (cat "\"\n\n\n\n(A new drawer titled \"Money Matters\" will be created and this will contain the " #ProgName " program.)"
  83. ))
  84.  
  85. (set #HardDiskDestChoiceConfirmHelp
  86. (cat "    Click YES to keep the destination drawer.\n\n    Click NO if you want to change the destination drawer."
  87. ))
  88.  
  89. (set #DrawerExistsMsg
  90. (cat "\nA drawer titled \"Money Matters\" already exists in the destination you have chosen.\n\nDo you wish to replace it or choose a new destination?"
  91. ))
  92.  
  93. (set #DrawerExistsChoice1
  94. (cat "Replace it"
  95. ))
  96.  
  97. (set #DrawerExistsChoice2
  98. (cat "Choose new destination"
  99. ))
  100.  
  101. (set #DrawerExistsHelp
  102. (cat "\n    You have chosen a destination drawer which already has \"Money Matters\" installed there.\n\n    Click \"" #DrawerExistsChoice1 "\" to replace the contents with this new version of " #ProgName ".\n    Click \"" #DrawerExistsChoice2 "\" to choose a new destination drawer."
  103. ))
  104.  
  105. (set #NoDiskSpaceMsg
  106. (cat "There is insufficient available space on your hard disk to install " #ProgName ". You will need at least " HDSizeNeeded "MB of free space.\n\nEither Abort this installation and delete some files from your hard disk, or try a different partition on your hard disk."
  107. ))
  108.  
  109. (set #HardDiskWorkingMsg
  110. (cat "Please wait... Installation is proceeding."
  111. ))
  112.  
  113.  
  114. (set #ImportantFinishedMsg
  115. (cat "\nI M P O R T A N T\n\n\nDon't forget to fill out your prepaid registration card and send it back to us.\n\nOnly registered users can receive technical support (via phone or letter), special upgrade deals and discounts."
  116. ))
  117.  
  118.  
  119. ; INSTALLATION
  120. (message #Welcome-Pirate)
  121.  
  122.  
  123. (if (< (/ (getversion) 65536) 37)
  124.     ( abort #badkick )
  125. )
  126.  
  127. ;INSTALL ON HARD DISK
  128. (
  129.     (complete 10)
  130.     (set MyDefault #HardDiskDefaultDest)
  131.     (set LibDest #HardDiskLibDest)
  132.     (set OK 0)
  133.     (until (= OK 1)
  134.         (set DestPath
  135.             (askdir
  136.                 (prompt #HardDiskDestChoiceMsg)
  137.                 (help #HardDiskDestChoiceHelp)
  138.                 (default MyDefault)
  139.             )
  140.         )
  141.             (if (exists (tackon DestPath "Money Matters")) ; if there is already a drawer named Money Matters
  142.                 (
  143.                     (if
  144.                         (askbool
  145.                             (prompt #DrawerExistsMsg)
  146.                             (choices #DrawerExistsChoice1 #DrawerExistsChoice2)
  147.                             (help #DrawerExistsHelp)
  148.                             (default 0)
  149.                         )
  150.                         ( ; [true] Lets replace it
  151.                             (set OK 1)
  152.                         )
  153.                         ( ;else [false]
  154.                             (set OK 0)
  155.                         )
  156.                     )
  157.                 )
  158.                 (    ;else
  159.                     (if
  160.                         (askbool
  161.                             (prompt #HardDiskDestChoiceConfirmMsg1 DestPath #HardDiskDestChoiceConfirmMsg2)
  162.                             (help #HardDiskDestChoiceConfirmHelp)
  163.                         )
  164.                         (set OK 1)
  165.                     ) ;endif
  166.                 ) ;end else
  167.             ) ;endif
  168.         (if (= OK 1)
  169.             (
  170.                 ; Multiply MB by 1024 twice to get number of bytes
  171.                 (set SpaceNeeded (* (* HDSizeNeeded 1024) 1024))
  172.                 (if (< (getdiskspace DestPath) SpaceNeeded)
  173.                     (
  174.                         (message #NoDiskSpaceMsg)
  175.                         (set OK 0)
  176.                     )
  177.                 ) ;endif
  178.             )
  179.         ) ;endif
  180.     ) ;end until
  181.     
  182.     (complete 20)
  183.     (set MMDrawerDest (tackon DestPath #ProgName))
  184.     
  185.     ; Okay to copy files
  186.     (makedir MMDrawerDest)
  187.     (complete 30)
  188.     (askdisk
  189.         (prompt #InsertDiskMsg #MMDiskName)
  190.         (help #diskhelp)
  191.         (dest #MMDiskName)
  192.     )
  193.     (working
  194.         (prompt #HardDiskWorkingMsg)
  195.     )
  196.     (copyfiles
  197.         (source (cat #MMDiskName ":Money Matters"))
  198.         (dest MMDrawerDest)
  199.         (infos)
  200.         (all)
  201.     )
  202.     (complete 85)
  203.  
  204.     (copyfiles
  205.         (source #FontSource)
  206.         (dest #HardDiskFontDest)
  207.         (pattern "Pica60")
  208.         (fonts)
  209.         (optional "force")
  210.     )
  211.  
  212.     (complete 90)
  213.     (if (not (exists (tackon #HardDiskLibDest "asl.library")))
  214.         (
  215.             (copyfiles
  216.                 (source #LibSource)
  217.                 (dest #HardDiskLibDest)
  218.                 (pattern "asl.library")
  219.                 (optional "force")            ; ignore delete protection
  220.             )
  221.             (complete 95)
  222.         )
  223.     )
  224.     (set @default-dest DestPath)
  225. ) ;end InstallHD
  226.  
  227. (complete 100)
  228. (message #ImportantFinishedMsg)
  229. (exit)